const getAllCategories=()=>{
    return $axios({
        url:'/category/findAll',
        method:'get'
    })
}

const addCategory=(params)=>{
    return $axios({
        url:'/category/add',
        method:'post',
        data: {...params}
    })
}
//启用方法
const deleteCategory=(id)=>{
    return $axios({
        url:`/category/${id}`,
        method:'delete'

    })
}
const findCategoryById=(id)=>{
    return $axios({
        url:`/category/${id}`,
        method:'get'

    })
}
const updateCategories=(params)=>{
    return $axios({
        url:'/category',
        method:'put'
    })
}